$(function(){
	var trades = [
		{name:'软件工程',value: 389},
		{name:'给排水',value: 259},
		{name:'信息管理',value: 262},
		{name:'货币金融',value: 324},
		{name:'计算机',value: 232},
		/*{name:'经济学',value: 176},
		{name:'工程管理',value: 196},
		{name:'网络工程',value: 214},
		{name:'电气自动化',value: 133},
		{name:'电子科学与技术',value: 370}*/
	];
	var taxes = [
		{name:'增值税',value: 389},
		{name:'消费税',value: 259},
		{name:'营业税',value: 262},
		{name:'企业所得',value: 324},
		{name:'个人所得',value: 232},
		/*{name:'房产税',value: 176},
		{name:'关税',value: 196},
		{name:'烟草税',value: 214},
		{name:'资源税',value: 133},
		{name:'印花税',value: 370}*/
	];
	var industrial = [
		{name:'金融',value: 389},
		{name:'文化',value: 259},
		{name:'保险',value: 262},
		{name:'咨询',value: 324},
		{name:'运输',value: 232},
		/*{name:'卫生',value: 176},
		{name:'教育',value: 196},
		{name:'建筑',value: 214},
		{name:'农业',value: 133},
		{name:'科学',value: 370}*/
	];

	taxRank("top1",trades,1,'行业注册数量TOP5排名','单位/个');//行业、税种、产业税收分布图表
	taxRank("top2",taxes,2,'行业税款数量TOP5排名','单位/万元');//行业、税种、产业税收分布图表
	taxRank("top3",industrial,3,'行业违法数量TOP5排名','单位/个');//行业、税种、产业税收分布图表
	lianYunGangMap("map");//连云港税收地图区域
	var nameArr2 = ['新增数量','旧有数量'];
	var dataArr2 = [
	{value: 15, name: '新增数量'}, 
	{value: 65, name: '旧有数量'}
	];

	var colors2 = ['#f97b82','#fba0a5'];
	sheetEcharts('chart1',nameArr2,dataArr2,colors2);//企业数量总概括图表
	
	logOut('chart3');//注销企业行为分布图
})


//连云港税收地图区域
function lianYunGangMap(id){	
	//城市坐标
    var geoCoordMap = {
        '海州区': [119.168258,34.539596],
        '新浦区': [119.284118,34.610208],
        '连云区': [119.349931,34.767693],
        '赣榆县': [119.180906,34.848309],
        '灌云县': [119.446447,34.389008],
        '东海县': [118.756619,34.551059],
        '灌南县': [119.323485,34.093123]
    };
    var data1 = [
        {name: '海州区', value: 185},
        {name: '新浦区', value: 195},
        {name: '连云区', value: 290},
        {name: '赣榆县', value: 180},
        {name: '灌云县', value: 170},
        {name: '东海县', value: 160},
        {name: '灌南县', value: 150}
    ];
    var data2 = [
        {name: '海州区', value: 295},
        {name: '新浦区', value: 165},
        {name: '连云区', value: 190},
        {name: '赣榆县', value: 180},
        {name: '灌云县', value: 170},
        {name: '东海县', value: 160},
        {name: '灌南县', value: 150}
    ];
    var resultdata1 = [];
    var resultdata2 = [];
    
    for(var i = 0; i < data1.length; i++){
    	var d1 = {
    		name: data1[i].name,
    		value: data1[i].value
    	}
    	resultdata1.push(d1);
    }
    for(var i = 0; i < data2.length; i++){
    	var d2 = {
    		name: data2[i].name,
    		value: data2[i].value
    	}
    	resultdata2.push(d2);
    }
    
    function numDescSort(a,b){//进行降序排序操作
		return a.value - b.value;
	}
    
    resultdata1.sort(numDescSort);
    resultdata2.sort(numDescSort);

    var echartWidth = $(window).width() * 0.46;
    var echartHeight = $(window).height() * 0.915;
    //初始化echarts
    var myChart = echarts.init(document.getElementById(id));//在id为mainMap的dom元素中显示地图
    //重置大小
    myChart.resize({
        width: echartWidth,
        height: echartHeight,
    });
    //载入连云港地图数据
	$.get('./js/mapdata/geometryCouties/320700.json', function (mapJson) {
        echarts.registerMap('320700', mapJson);
        var max = 480, min = 9; // todo 
	    var maxSize4Pin = 100, minSize4Pin = 20;
	
		var convertData = function (data) {
			var res = [];
			for (var i = 0; i < data.length; i++) {
		        var geoCoord = geoCoordMap[data[i].name];
		        if (geoCoord) {
		            res.push({
		                name: data[i].name,
		                value: geoCoord.concat(data[i].value)
		            });
		        }
		   }
		    return res;
		};
		
        //设置地图上的各项参数
        var options = {
	        title: {
	            text: '连云港市税收收入与非税收收入分布图',
	            //subtext: '',
	            x: 'center',
	            textStyle: {
	                color: '#fff',
	                fontWeight: 'normal'
	            }
	        },
	        tooltip: {
	            /*trigger: 'item',
	            formatter: function (params) {
	              if(typeof(params.value)[2] == "undefined"){
	              	return params.name + ' : ' + params.value;
	              }else{
	              	return params.name + ' : ' + params.value[2];
	              }
	            }*/
	        },
	        legend: {
	            //orient: 'vertical',//垂直居中
	            y: 'bottom',
	            x: 'center',
	            data: ['税收收入量','非税收收入量'],
	            textStyle: {
	            	fontSize: 14,
	                color: '#fff'
	            },
	            selectedMode: 'single'//单显示模式
	        },
	        visualMap: {
	            show: false,
	            min: 0,
	            max: 500,
	            left: 'left',
	            top: 'bottom',
	            text: ['高', '低'], // 文本，默认为数值文本
	            calculable: true,
	            seriesIndex: [1],
	            inRange: {
	                // color: ['#3B5077', '#031525'] // 蓝黑
	                // color: ['#ffc0cb', '#800080'] // 红紫
	                // color: ['#3C3B3F', '#605C3C'] // 黑绿
	                //color: ['#0f0c29', '#302b63', '#24243e'] // 黑紫黑
	                // color: ['#23074d', '#cc5333'] // 紫红
	                // color: ['#00467F', '#A5CC82'] // 蓝绿
	                // color: ['#1488CC', '#2B32B2'] // 浅蓝
	                // color: ['#00467F', '#A5CC82'] // 蓝绿
	                // color: ['#00467F', '#A5CC82'] // 蓝绿
	                // color: ['#00467F', '#A5CC82'] // 蓝绿
	                // color: ['#00467F', '#A5CC82'] // 蓝绿
	
	            }
	        },
	        // toolbox: {
	        //     show: true,
	        //     orient: 'vertical',
	        //     left: 'right',
	        //     top: 'center',
	        //     feature: {
	        //             dataView: {readOnly: false},
	        //             restore: {},
	        //             saveAsImage: {}
	        //             }
	        // },
	        geo: {
	            show: true,
	            map: '320700',
	            left: '5%',
	            right: '40%',
	            label: {
	                normal: {
	                    show: false
	                },
	                emphasis: {
	                    show: false,
	                }
	            },
	            roam: true,
	            itemStyle: {
	                normal: {
	                    areaColor: "rgba(0,0,0,0.3)",//地图区域颜色
	                    borderColor: '#fff',
	                },
	                emphasis: {
	                    areaColor: '#333399',//鼠标悬浮时区域颜色
	                }
	            }
	        },
	        grid: {//针对直角坐标的柱形图而应用
		        right: '5%',
		        top: '10%',
		        bottom: 40,
		        width: '28%'
		    },
		    xAxis: {
		        type: 'value',
		        scale: true,
		        position: 'top',
		        boundaryGap: false,
		        splitLine: {
		            show: false
		        },
		        axisLine: {
		            show: false
		        },
		        axisTick: {
		            show: false
		        },
		        axisLabel: {
		            margin: 2,
		            textStyle: {
		                color: '#aaa'
		            }
		        },
		    },
		    yAxis: {
		        type: 'category',
		        data: [],
		        //  name: 'TOP 20',
		        nameGap: 16,
		        axisLine: {
		            show: true,
		            lineStyle: {
		                color: '#ddd'
		            }
		        },
		        axisTick: {
		            //show: false,
		            alignWithLabel: true,
		            lineStyle: {
		                color: '#ddd'
		            }
		        },
		        axisLabel: {
		            interval: 0,
		            textStyle: {
		                color: '#ddd'
		            }
		        }
		    },
	        series : [
	    	{
	            name: '税收收入量',
	            type: 'scatter',
	            coordinateSystem: 'geo',
	            data: convertData(data1),
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量 : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            symbolSize: function (val) {
	                return val[2] / 10;
	            },
	            show: false,
	            label: {//散点图右侧显示位置说明
	                normal: {
	                    formatter: '{b}',
	                    position: 'right',
	                    show: true
	                },
	                emphasis: {
	                    show: true
	                }
	            },
	            itemStyle: {
	                normal: {
	                    color: '#ffb100'//文字的颜色
	                }
	            }
	        },
	    	{
	            name: '非税收收入量',
	            type: 'scatter',
	            coordinateSystem: 'geo',
	            data: convertData(data2),
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量  : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            symbolSize: function (val) {
	                return val[2] / 10;
	            },
	            label: {//散点图右侧显示位置说明
	                normal: {
	                    formatter: '{b}',
	                    position: 'right',
	                    show: true
	                },
	                emphasis: {
	                    show: true
	                }
	            },
	            itemStyle: {
	                normal: {
	                    color: '#05C3F9'//文字的颜色
	                }
	            }
	        },
	         {
	            type: 'map',
	            map: '320700',
	            geoIndex: 0,
	            aspectScale: 0.75, //长宽比
	            showLegendSymbol: false, // 存在legend时显示
	            tooltip: {
	            	show: false//地图不显示提示信息
	            },
	            label: {
	                normal: {
	                    show: false
	                },
	                emphasis: {
	                    show: false,
	                    textStyle: {
	                        color: '#fff'
	                    }
	                }
	            },
	            roam: true,
	            itemStyle: {
	                normal: {
	                    /*areaColor: '#031525',*/
	                    borderColor: '#3B5077',
	                },
	                emphasis: {
	                    areaColor: '#2B91B7'
	                }
	            },
	            animation: false,
	            data: []
	        },
	        {
	            name: '税收收入量',//当name的值与lenend里的data对应时，可以通过点击操作显示与隐藏
	            type: 'scatter',
	            coordinateSystem: 'geo',
	            symbol: 'pin',//标记的图标类型
	            symbolSize: function (val) {
	                var a = (maxSize4Pin - minSize4Pin) / (max - min);
	                var b = minSize4Pin - a*min;
	                b = maxSize4Pin - a*max;
	                return a*val[2]+b;
	            },
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量 : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            label: {
	                normal: {
	                    show: true,
	                    textStyle: {
	                        color: '#fff',
	                        fontSize: 9,
	                    }
	                }
	            },
	            itemStyle: {
	                normal: {
	                    color: '#FF3300', //标志颜色
	                }
	            },
	            zlevel: 6,
	            data: convertData(data1),
	        },
	        {
	            name: '非税收收入量',//当name的值与lenend里的data对应时，可以通过点击操作显示与隐藏
	            type: 'scatter',
	            coordinateSystem: 'geo',
	            symbol: 'pin',//标记的图标类型
	            symbolSize: function (val) {
	                var a = (maxSize4Pin - minSize4Pin) / (max - min);
	                var b = minSize4Pin - a*min;
	                b = maxSize4Pin - a*max;
	                return a*val[2]+b;
	            },
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量  : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            label: {
	                normal: {
	                    show: true,
	                    textStyle: {
	                        color: '#fff',
	                        fontSize: 9,
	                    }
	                }
	            },
	            itemStyle: {
	                normal: {
	                    color: '#F62157', //标志颜色
	                }
	            },
	            zlevel: 6,
	            data: convertData(data2),
	        },
	        {
	            name: '税收收入量',//top5的动态散点
	            type: 'effectScatter',
	            coordinateSystem: 'geo',
	            data: convertData(data1.sort(function (a, b) {
	                return b.value - a.value;
	            }).slice(0, 5)),
	            symbolSize: function (val) {
	                return val[2] / 10;
	            },
	            showEffectOn: 'render',
	            rippleEffect: {
	                brushType: 'stroke'
	            },
	            hoverAnimation: true,
	            /*label: {//显示位置说明
	                normal: {
	                    formatter: '{b}',
	                    position: 'right',
	                    show: true
	                }
	            },*/
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量 : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            itemStyle: {
	                normal: {
	                    color: '#ffb100',
	                    shadowBlur: 10,
	                    shadowColor: '#ffb100'
	                }
	            },
	            zlevel: 1
	        },
	        {
	            name: '非税收收入量',//top5的动态散点
	            type: 'effectScatter',
	            coordinateSystem: 'geo',
	            data: convertData(data2.sort(function (a, b) {
	                return b.value - a.value;
	            }).slice(0, 5)),
	            symbolSize: function (val) {
	                return val[2] / 10;
	            },
	            showEffectOn: 'render',
	            rippleEffect: {
	                brushType: 'stroke'
	            },
	            hoverAnimation: true,
	            /*label: {//显示位置说明
	                normal: {
	                    formatter: '{b}',
	                    position: 'right',
	                    show: true
	                }
	            },*/
	            tooltip: {
	            	trigger: 'item',
		            formatter: function (params) {
		              if(typeof(params.value)[2] == "undefined"){
		              	return params.name + '<br />金额量  : ' + params.value + ' 万';
		              }else{
		              	return params.name + '<br />金额量 : ' + params.value[2] + ' 万';
		              }
		             
		            }
		        },
	            itemStyle: {
	                normal: {
	                    color: '#05C3F9',
	                    shadowBlur: 10,
	                    shadowColor: '#05C3F9'
	                }
	            },
	            zlevel: 1
	        },
	        {
	        	name: '税收收入量',
	        	type: 'bar',
		        label: {//通过将其定位来实现y轴的目录显示
	                normal: {
	                    show: true,
	                    formatter: '{b}     {c}',
	                    position: [-40, 18],
	                    textStyle: {
	                        color: "#fff",
	                        //fontSize: 16
	                    }
	                },
	                emphasis: {
	                    show: true
	                }
	            },
	            symbol: 'none',
	            itemStyle: {
	            	normal:{
	            		color: "#EEAA33"
	            	},
	                emphasis: {
	                    color: "#EEAA33"
	                }
	            },
	        	data: resultdata1
	        },
	        {
	        	name: '非税收收入量',
	        	type: 'bar',
		        label: {//通过将其定位来实现y轴的目录显示
	                normal: {
	                    show: true,
	                    formatter: '{b}     {c}',
	                    position: [-40, 18],
	                    textStyle: {
	                        color: "#fff",
	                        //fontSize: 16
	                    }
	                },
	                emphasis: {
	                    show: true
	                }
	            },
	            symbol: 'none',
	            itemStyle: {
	            	normal: {
	            		color: "#66CCFF"
	            	},
	                emphasis: {
	                    color: "#66CCFF"
	                }
	            },
	        	data: resultdata2
	        }
	    ]
    };
    myChart.setOption(options);
		
	});
}

//行业、税种、产业税收分布图表
/**
 * 
 * @param {Object} id 元素id
 * @param {Object} dataArr 数据对象
 * @param {Object} num 颜色编号
 * @param {Object} title 标题名
 * @param {Object} unit 单位名称
 */
function taxRank(id,dataArr,num,title,unit){
	var echartWidth = $(window).width() * 0.246;
	var echartHeight = $(window).height() * 0.298;
	// 基于准备好的dom，初始化echarts实例
	var myChart = echarts.init(document.getElementById(id));
	/*根据浏览器宽、高设置echarts 宽、高*/
	
	myChart.resize({
	    width: echartWidth,
	    height: echartHeight,
	});
	/*end*/
	//var dataAll = [389, 259, 262, 324, 232, 176, 196, 214, 133, 370];
	//var yAxisData = ['原因1','原因2','原因3','原因4','原因5','原因6','原因7','原因8','原因9','原因10'];
	function numDescSort(a,b){//进行降序排序操作
		return a.value - b.value;
	}
	var convertData = dataArr;//数据
	var dataTitle = [];//标题
	convertData.sort(numDescSort);//对数据进行排序操作
	for(var i = 0 ;i < convertData.length; i++){
		dataTitle.push(convertData[i].name);
	}
	//定义不同的渐变色
	function colors(num){
		var color;
		if(num ==1){
			color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
            "offset": 0,
            "color": "#ffb069" // 0% 处的颜色
        }, {
            "offset": 1,
            "color": "#ec2e85" // 100% 处的颜色
        }], false)
		}else if(num ==2){
			color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
	            offset: 0,
	            color: '#96d668'
	        }, {
	            offset: 1,
	            color: '#01babc'
	        }], false)
		}else{
	        color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
	            offset: 0,
	            color: '#1a98f8'
	        }, {
	            offset: 1,
	            color: '#7049f0'
	        }], false)
        }
		return color;
	}

	var options = {
	    "title": {
	        "text": title,
	        "x": "center",
	        "textStyle": {
	        	"align": "center",
	            "color": "#bcbfff",
	            "fontWeight": "bold",
	            "fontSize": 14
	        },
	        /*"subtext": "单位/万元",
	        "subtextStyle": {
	        	"align": "left",
	        	"color": "#aaa"
	        }*/
	        /*"top": "4%",
	        "left": "2.2%"*/
	    },
	    "tooltip": {
	        "trigger": "axis",
	        "axisPointer": { // 坐标轴指示器，坐标轴触发有效
	            "type": "shadow" // 默认为直线，可选为："line" | "shadow"
	        }
	    },
	    "grid": {
	    	"top": "18%",
	        "left": "3%",
	        "right": "10%",
	        "bottom": "0%",
	        "containLabel": true
	    },
	    "yAxis": [{
	        "type": "category",
	        "data": dataTitle,
	        "axisLine": {
	            "show": false
	        },
	        "axisTick": {
	            "show": false,
	            "alignWithLabel": true
	        },
	        "axisLabel": {
	            "textStyle": {
	                "color": "#ffb069"
	            }
	        }
	    },{
	    	name: unit,
	    	type: "value",
	    	nameTextStyle: {
	    		color: '#aaa',
	    		align: 'left'
	    	}
	    }],
	    "xAxis": [{
	        "type": "value",
	        "axisLine": {
	            "show": false
	        },
	        "axisTick": {
	            "show": false
	        },
	        "axisLabel": {
	            "show": false
	        },
	        "splitLine": {
	            "show": false
	        }
	    }],
	
	    "series": [{
	        "name": "税收额",
	        "type": "bar",
	        "data": convertData,
	        "barCategoryGap": "35%",
	        "label": {
	            "normal": {
	                "show": true,
	                "position": "right",
	                "formatter": function(params) {
	                    return params.data.value;
	                },
	                "textStyle": {
	                    "color": "#bcbfff" //color of value
	                }
	            }
	        },
	        "itemStyle": {
	            "normal": {
	                /*"color": new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
	                    "offset": 0,
	                    "color": "#ffb069" // 0% 处的颜色
	                }, {
	                    "offset": 1,
	                    "color": "#ec2e85" // 100% 处的颜色
	                }], false)*/
	               "color": colors(num)
	            }
	        }
	    }]
	};
	// 使用刚指定的配置项和数据显示图表。
	myChart.setOption(options);
}

//企业数量总概括图表
function sheetEcharts(id,legend,data,colors){
	var echartWidth = $(window).width() * 0.165;
    var echartHeight = $(window).height() * 0.235;
    //初始化echarts
    var myChart = echarts.init(document.getElementById(id));//在id为mainMap的dom元素中显示地图
    //重置大小
    myChart.resize({
        width: echartWidth,
        height: echartHeight,
    });
	var options = {
	    title:[
	            /*{text:"订单量小于100情况分析",x: 'center', y: '1%',textStyle:{fontSize:"17"}},       
		        {text:"表记录数量",x: '5%', y: '5%',textStyle:{fontSize:"14"}},
		        {text:"字段数量",x: '50%', y: '5%',textStyle:{fontSize:"14"}},*/
		    ],
		    
	    tooltip: {
	        trigger: 'item',
	        formatter: "{a} <br/>{b} : {c} ({d}%)"
	    },
	    legend: {
	    	bottom: 0,
	    	left: 'center',
	    	textStyle: {
            	fontSize: 12,
                color: '#fff'
            },
	    	data: legend
	    },
	    color: colors/*[
	        '#00acee',
	        '#52cdd5',
	        '#79d9f1',
	        '#a7e7ff',
	        '#c8efff'
	    ]*/,
	    series: [{
	        name: '表记录数量',
	        type: 'pie',
	        radius: '60%',
	        center: ['50%', '45%'],
	        clockwise: false,
	        data: data,
	        label: {
	            normal: {
	            	formatter: '{b}\n{d}%',//指示外引显示数据格式
	                textStyle: {
	                    /*color: '#333',*/
	                    fontSize: 12,
	                }
	            }
	        },
	        labelLine: {
	            normal: {
	                show: true//指示外引线段设置
	            }
	        },
	        itemStyle: {
	            normal: {
	                borderWidth: 4,
	                borderColor: 'rgba(0,0,0,0.3)',
	            },
	            emphasis: {
	                borderWidth: 0,
	                shadowBlur: 10,
	                shadowOffsetX: 0,
	                shadowColor: 'rgba(0, 0, 0, 0.5)'
	            }
	        }
	    }/*,
	    {
	        name: '字段数量',
	        type: 'pie',
	        radius: '60%',
	        center: ['70%', '45%'],
	        clockwise: false,
	        data: [{
	            value: 456,
	            name: '旧有数量'
	        }, {
	            value: 251,
	            name: '新增数量'
	        }, ],
	        label: {
	            normal: {
	            	formatter: '{b}\n{d}%',//指示外引显示数据格式
	                textStyle: {
	                    color: '#333',
	                    fontSize: 12,
	                }
	            }
	        },
	        labelLine: {
	            normal: {
	                show: true//指示外引线段设置
	            }
	        },
	        itemStyle: {
	            normal: {
	                borderWidth: 4,
	                borderColor: '#ffffff',
	            },
	            emphasis: {
	                borderWidth: 0,
	                shadowBlur: 10,
	                shadowOffsetX: 0,
	                shadowColor: 'rgba(0, 0, 0, 0.5)'
	            }
	        }
	    }*/
	    
	    ]
	    
	};
    myChart.setOption(options);
}

//注销企业行业排名图形
function logOut(id){
	var echartWidth = $(window).width() * 0.165;
	var echartHeight = $(window).height() * 0.235;
	// 基于准备好的dom，初始化echarts实例
	var myChart = echarts.init(document.getElementById(id));
	/*根据浏览器宽、高设置echarts 宽、高*/
	
	myChart.resize({
	    width: echartWidth,
	    height: echartHeight,
	});
	/*end*/
	var options = {
	    //backgroundColor: '#394056',
	    title: {
	        /*text: '注销量分析图',*/
	        textStyle: {
	            /*fontWeight: 'bold',*/
	            fontSize: 14,
	            color: '#fff'
	        },
	        left: '0%',
	        top: '2%'
	    },
	    tooltip: {
	        trigger: 'axis',
	        formatter: '{b} <br/> {a} : {c} 个',
	        axisPointer: {
	            lineStyle: {
	                color: '#fff'
	            }
	        }
	    },
	    legend: {
	        icon: 'rect',
	        itemWidth: 14,
	        itemHeight: 5,
	        itemGap: 13,
	        data: ['注销量'],
	        right: '4%',
	        top: '4%',
	        textStyle: {
	            fontSize: 12,
	            color: '#fff'
	        }
	    },
	    grid: {
	    	top: '30%',
	        left: '2%',
	        right: '5%',
	        bottom: '0%',
	        containLabel: true
	    },
	    xAxis: [{
	        type: 'category',
	        boundaryGap: true,
	        axisLine: {
	            lineStyle: {
	                color: '#fff'
	            }
	        },
	        axisLabel: {
	            textStyle: {
	                color: '#fff',
	                fontSize: 12
	            },
	            //rotate: 40 //设置x轴文字旋转方向
	        },
	        data: ['行业1', '行业2', '行业3','行业4','行业5','行业6']
	    }, {
	        axisPointer: {
	            show: false
	        },
	        axisLine: {
	            lineStyle: {
	                color: '#f3f3f3'
	            }
	        },
	        axisTick: {
	            show: false
	        },
	
	        position: 'bottom',
	        offset: 20
	    }],
	    yAxis: [{
	        type: 'value',
	        name: '数量(个)',
	        axisTick: {
	            show: false
	        },
	        axisLine: {
	            lineStyle: {
	                color: '#fff'
	            }
	        },
	        axisLabel: {
	            margin: 10,
	            textStyle: {
	                fontSize: 12
	            }
	        },
	        splitLine: {//控制y轴的背景线段
	        	show: true,
	        	lineStyle: {
	        		color: '#aaa',
	        		type: 'dashed'
	        	}
	        },
	    }],
	    series: [{
	        name: '注销量',
	        type: 'line',
	        smooth: true,
	        symbol: 'circle',
	        symbolSize: 5,
	        showSymbol: true,//显示拆线上的圆点
	        lineStyle: {
	            normal: {
	                width: 1
	            }
	        },
	        areaStyle: {
	            normal: {
	                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
	                    offset: 0,
	                    color: 'rgba(0, 255, 0, 0.3)'
	                }, {
	                    offset: 0.8,
	                    color: 'rgba(0, 255, 0, 0.6)'
	                }], false),
	                shadowColor: 'rgba(0, 0, 0, 0.1)',
	                shadowBlur: 10
	            }
	        },
	        itemStyle: {
	            normal: {
	                color: 'rgba(0, 255, 0,1)',
	                borderColor: 'rgba(0, 255, 0,0.2)',
	                borderWidth: 12
	
	            }
	        },
	        data: [120, 110, 125, 145, 122, 165]
	    }]
	};
	// 使用刚指定的配置项和数据显示图表。
	myChart.setOption(options);
}